﻿<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >

  <LinearGradientBrush x:Key="TrackBackground" EndPoint="0,1" StartPoint="0,0">
    <GradientStop Color="#FF4D4D4D" Offset="0.036"/>
    <GradientStop Color="#FF717474" Offset="0.908"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="DecreaseBackground" EndPoint="0,1" StartPoint="0,0">
    <GradientStop Color="#FFD2D3D3" Offset="0.036"/>
    <GradientStop Color="#FF878787" Offset="0.892"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="TrackBorder" EndPoint="0,1" StartPoint="0,0">
    <GradientStop Color="#FF373737" Offset="0.16"/>
    <GradientStop Color="#FFE0E0E1" Offset="1"/>
  </LinearGradientBrush>
  <Style x:Key="DecreaseRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Border CornerRadius="2.5,0,0,2.5" Background="{StaticResource DecreaseBackground}" Margin="6.5,3,0,3">
            <Rectangle Fill="Transparent" />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="IncreaseRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Rectangle Fill="Transparent"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <LinearGradientBrush x:Key="ThumbStrokeBrush" EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
    <GradientStop Color="#FF706E6E" Offset="0.912"/>
    <GradientStop Color="#FF646464" Offset="0.204"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ThumbBrush" EndPoint="0.5,0" StartPoint="0.5,1" MappingMode="RelativeToBoundingBox">
    <LinearGradientBrush.RelativeTransform>
      <TransformGroup>
        <RotateTransform Angle="-17.802" CenterX="0.5" CenterY="0.5"/>
      </TransformGroup>
    </LinearGradientBrush.RelativeTransform>
    <GradientStop Color="#FFEBEBEB" Offset="0.984"/>
    <GradientStop Color="#FFA3A3A3" Offset="0.38"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ThumbBrushOver" EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
    <LinearGradientBrush.RelativeTransform>
      <TransformGroup>
        <RotateTransform Angle="-17.802" CenterX="0.5" CenterY="0.5"/>
      </TransformGroup>
    </LinearGradientBrush.RelativeTransform>
    <GradientStop Color="#FF99B4D1" Offset="0.664"/>
    <GradientStop Color="White" Offset="0"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ThumbBrushDragging" EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
    <LinearGradientBrush.RelativeTransform>
      <TransformGroup>
        <RotateTransform Angle="-17.802" CenterX="0.5" CenterY="0.5"/>
      </TransformGroup>
    </LinearGradientBrush.RelativeTransform>
    <GradientStop Color="#FFEBEBEB" Offset="0.244"/>
    <GradientStop Color="#FF626262" Offset="1"/>
  </LinearGradientBrush>
  <Style x:Key="ThumbStyle" TargetType="{x:Type Thumb}">
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="Height" Value="10"/>
    <Setter Property="Width" Value="10"/>
    <Setter Property="Foreground" Value="Gray"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Thumb}">
          <Grid>
            <Ellipse
							x:Name="ThumbBody" SnapsToDevicePixels="True"
							Stroke="{StaticResource ThumbStrokeBrush}"
							Fill="{StaticResource ThumbBrush}"/>
            <Ellipse
							SnapsToDevicePixels="True" StrokeThickness="0.5"
							Stroke="#ff8F8F8F"
							Width="4" Height="4" Fill="#FF3F3F3F" />
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter Property="Fill" TargetName="ThumbBody" Value="{StaticResource ThumbBrushOver}"/>
            </Trigger>
            <Trigger Property="IsDragging" Value="True">
              <Setter Property="Fill" TargetName="ThumbBody" Value="{StaticResource ThumbBrushDragging}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="VolumeSliderStyle" TargetType="{x:Type Slider}">
    <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Slider}">
          <Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
              </Grid.RowDefinitions>
              <Border x:Name="TrackBackground" Margin="5,0" VerticalAlignment="center"
									Height="6.0"
									Background="{StaticResource TrackBackground}"
									BorderBrush="{StaticResource TrackBorder}" BorderThickness="1" CornerRadius="3">
              </Border>
              <Track x:Name="PART_Track">
                <Track.DecreaseRepeatButton>
                  <RepeatButton Margin="0,0,-3,0"
										Style="{StaticResource DecreaseRepeatButtonStyle}"
										Command="{x:Static Slider.DecreaseLarge}"/>
                </Track.DecreaseRepeatButton>
                <Track.IncreaseRepeatButton>
                  <RepeatButton Style="{StaticResource IncreaseRepeatButtonStyle}"
										Command="{x:Static Slider.IncreaseLarge}"/>
                </Track.IncreaseRepeatButton>
                <Track.Thumb>
                  <Thumb x:Name="Thumb" Style="{DynamicResource ThumbStyle}"/>
                </Track.Thumb>
              </Track>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocused" Value="true">
              <Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

</ResourceDictionary>